CPP Library

code...

 

http://www.w3schools.com/cssref/tryit.asp?filename=trycss_text_background
http://www.quackit.com/html/html_color_codes.cfm
===============================================
#include <iostream>
using namespace std;
int main()
{
// Define and initialize variables
    double mealCost = 0.00,       // Meal cost
    taxRate = .0675,                  // Tax rate
    tipRate = .15,                       // Tip percentage
    taxAmt,                                // Tax amount
    tipAmt,                                 // Tip amount
    totalBill;                               // Total amount to pay
    cout.precision(2);

    cout << "What was the amount of the meal? ";
    cin >> mealCost;
    // Calculate tax, tip, and total
    taxAmt = taxRate * mealCost;
    tipAmt = tipRate * (mealCost + taxAmt);
    totalBill = mealCost + taxAmt + tipAmt;
    // Display Results
    cout << "Meal Cost $" << fixed << mealCost << endl;
    cout << "Tax $ " << fixed << taxAmt << endl;
    cout << "Tip $ " << fixed << tipAmt << endl;
    cout << "Total $" << fixed << totalBill << endl;
    system("Pause");
    return 0;
}

===============================================

#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World!" << endl;
    cout << "Welcome to C++ Programming\n";
    system("Pause");
    return 0;
}


===============================================

// cin.cpp : Defines the entry point for the console application.
#include <iostream>
using namespace std;
int main()
{
    double numSold, earningsPerBar, totalEarnings;
    // Get the number of candy bars sold.
    cout << "How many candy bars were sold? ";
    cin >> numSold;
    // Get the amount earned per bar sold.
    cout << "How much is earned for each bar sold? ";
    cin >> earningsPerBar;
    // Calculate the total earnings.
    totalEarnings = numSold * earningsPerBar;
    // Display the total earnings.
    cout << "You have earned $" << totalEarnings << endl;
    system("pause");
    return 0;
}

===============================================

// ConsoleApplication2.cpp : Loop and IF.
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
    int in0 = 0;
    int counter = 0;
    do
    {
    counter = counter + 1;
    if (counter == 5)
        {
            in0 = 1;
        }
    cout << counter << endl;
    cout << "Hello, this is simple for those who know what they are doing." << endl;
    }while (in0 == 0);
    system("pause");
}

===============================================

#include <iostream>
using namespace std;

int main()
{
    double number, ans;
    cout << "Enter a number: ";
    cin >> number;
    ans = number /5;
    cout << "The answer is: "<< ans << endl;
    cout << "Press any key to continue: ";
    cin.sync();
    cin.get();
    return 0;
}

===============================================

#include <iostream>
using namespace std;

int main()
{
    for (int i = 1; i <= 100; i++)
    {
         cout << i << endl;
    }
    system("Pause");
    return 0;
}

===============================================

#include <iostream>
using namespace std;

int main()
{
    int number = 0;
    while (number < 100)
    {
         number++;
         cout << number << endl;
     }

    system("Pause");
    return 0;

}

===============================================